package com.sddongyun.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class HisDao {
  @Autowired
  private JdbcTemplate jdbctemplate;


  public List queryLike(String name) {
    //select * from DHC_TarArcInsu  where ARCIM_Desc like
    String sql = "select * from DHC_TarArcInsu  where ARCIM_Desc  like '"+name+"%' ";
    List<Map<String,Object>> l = jdbctemplate.queryForList(sql);
    return l ;
  }
  public List query(String name) {
    String sql = "select * from DHC_TarArcInsu  where ARCIM_Desc  = ? ";
    List l = jdbctemplate.queryForList(sql, name);
    return l ;
  }

  public static void main(String[] args) {

  }
}